<#include "/includes/header.ftl">


<div id='productlist_brands'>
	<#include "/includes/leftbar.ftl">
</div>

<div id='productlist_contents'>
<#if website?has_content>
  	<form name="edit_store_profile" action='<@spring.url "/updatewebsiteprimarycategory.php"/>' method="post" onsubmit="return check_form(create_account);">
  		<INPUT type='hidden' name='wbsid' value='${website.sysId}'>
  		<INPUT type="hidden" name="type" value='${type?default("area")}'/>
  		<b><#if type=="area">Update Website【<A href='${website.id?default("#")}' target=_blank>${website.name?default("")}</A>】 Primary Area Category<#else>Update Website【<A href='${website.id?default("#")}' target=_blank>${website.name?default("")}</A>】 Primary Content Category</#if></b>
  		<A href='<@spring.url "/editwebsiteprofile.php?wbsid=${website.sysId}"/>'>Edit</A>
		<div><hr/></div>
		<div class="label">
			<#if primaryCategoryTrail?has_content>
				<#list primaryCategoryTrail as g>
					<A href='<@spring.url "/updatewebsiteprimarycategory.php?type=${type}&catid=${g.id}&wbsid=${website.sysId}"/>'>${g.name}</A>&gt;&gt;
				</#list>
				<div><hr/><hr/></div>
			</#if>
		</div>
		<div class="label">
			<#if childCategoryList?has_content>
				<#list childCategoryList as g>
					<A href='<@spring.url "/updatewebsiteprimarycategory.php?type=${type}&catid=${g.id}&wbsid=${website.sysId}"/>'>${g.name}</A>
				</#list>
			</#if>
		</div>
		
		<div>
		<#if category?has_content && !childCategoryList?has_content>
			<div class="label">
				<#if category?has_content>
					<INPUT type='hidden' name='catid' value='${category.id}'/>${category.name?default("No-Name")}
				</#if>
			</div>
	    	<input type="submit" name="Submit" value="保存" />
	    </#if>
		</div>
	</form>		

	<div><hr/><hr/><hr/></div>
	<div class="label">Preset Primary Area Category:</div>
	<div>
	<#if primaryAreaCategoryTrail?has_content>
		<#list primaryAreaCategoryTrail as g>
		<A href='<@spring.url "/updatewebsiteprimarycategory.php?type=area&catid=${g.id}&wbsid=${website.sysId}"/>'>${g.name}</A>&gt;&gt;
		</#list>
	</#if>&nbsp;&nbsp;<A href='<@spring.url "/updatewebsiteprimarycategory.php?type=area&wbsid=${website.sysId}"/>'>Edit</A>
	</div>
	
	<div><hr/><hr/><hr/></div>
	<div class="label">Preset Primary Content Category:</div>
	<div>
	<#if websitePrimaryCategoryTrail?has_content>
		<#list websitePrimaryCategoryTrail as g>
		<A href='<@spring.url "/updatewebsiteprimarycategory.php?type=content&catid=${g.id}&wbsid=${website.sysId}"/>'>${g.name}</A>&gt;&gt;
		</#list>
	</#if>&nbsp;&nbsp;<A href='<@spring.url "/updatewebsiteprimarycategory.php?type=content&wbsid=${website.sysId}"/>'>Edit</A>
	</div>
	<div><hr/><hr/><hr/></div>
<#else>
	Not found website!
</#if>	
</div>

<#include "/includes/footer.ftl">